package 语言特性学习;

import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

/**
 * Description
 *
 * @Author: Heiffeng
 * @Date: 2021/12/19 12:13
 */
public class 值传递 {

    @Test
    public void test1(){
        Map<String,String> map = new HashMap<>();
        swap(map);
        System.out.println(map.get("hello"));
    }

    private void swap(Map<String, String> map){
        Map map2 = map;
        map2.put("hello","world");
    }
}

